package com.threadpool;

import java.util.HashSet;
import java.util.Set;

public class NowCoder {
    public static void main(String[] args) {
        Set<MyClass> set = new HashSet<MyClass>();
        set.add(new MyClass(5));
        set.add(new MyClass(3));
        set.add(new MyClass(4));
        System.out.println(set.size());

        long a = System.currentTimeMillis();
        System.out.println();
        System.out.println(numReverse(numReverse(123) + numReverse(100)));
        System.out.println(System.currentTimeMillis() - a);

    }


    public static int numReverse(int num) {

        int modNum = 0;// 余数
        int result = 0;

        while (num / 10 != 0) {// 当num为一位数时，跳出循环

            modNum = num % 10;
            num = num / 10;
            result = result * 10 + modNum;
        }

        return result * 10 + num;// 当num为一位数时，返回结果
    }
}
